<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:head>
        <title></title>
    </h:head>
    <f:view  >
    <h:form id="UserForm" prependId="false" >
                   <p:growl id="growl" showDetail="true" life="3000" /> 
                      <p:panel header="Thêm Mới De Thi" style="background-color: #ebf3fd;">  
                          <h:outputLabel value ="#{dethiController.getRequest()}" />
                         <p:panel>
                            <h:panelGrid  columns="2" cellpadding="0" >   
                                          <h:outputLabel value=" Ngày Tao :  " />  
                                          <h:outputLabel  value ="#{dethiController.dethi.ngaytao}"  >
                                              <f:convertDateTime pattern="dd/MM/yyyy" />
                                          </h:outputLabel> 
                                          <h:outputLabel  value=" Môn Học :  " />  
                                          <h:outputLabel  value ="#{dethiController.dethi.mamh}" />   
                                          <h:outputLabel  value=" Level :  " />  
                                          <h:outputLabel  value ="#{dethiController.dethi.maLevel}" />   
                                          <h:outputLabel  value="So cau tra loi:  " />  
                                          <h:outputLabel  value ="#{dethiController.dethi.sodapan}" />   
                                 </h:panelGrid> 
                               </p:panel>
                                <!-- Phan chinh sua cau hoi -->
                                 <h:panelGrid  columns="1" > 
                                     <p:panel>
                                          <p:editor value="#{dethiController.dethi.noidung}" widgetVar="editor" height="300"  /> 
                                     </p:panel>
                                 </h:panelGrid>
                                <!-- phan dien cau tra loi  -->
                                <p:panel header ="Trả Lời" >
                                                       <p:dataTable var="cauhoi" value="#{dethiController.listTraLoi}"  style="border: none" >  
                                                                <p:column  style ="width: 10px" >  
                                                                   <h:selectBooleanCheckbox value="#{cauhoi.dung}"/>  
                                                                </p:column> 
                                                                <p:column style ="width: 600px">  
                                                                    <p:inputTextarea value="#{cauhoi.noidung}"  style="width:600px;" effectDuration="400"/>  
                                                                </p:column>  
                                                     </p:dataTable>  
                                  </p:panel>
                                 <h:panelGrid columns="2" style="margin-top:10px">  
                                            <h:commandButton value=" Thêm Mới Câu Hỏi " action="#{dethiController.actionCommit()}"  />  
                                 <h:panelGrid/>
                             </h:panelGrid> 
              
      </p:panel>
    </h:form>
  </f:view>
    
</html>

